// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入vue-resource
import VueResource from 'vue-resource';
//安装vue-resource
Vue.use(VueResource);
// 设置请求的根路径
// Vue.http.options.root = 'http://vue.studyit.io';
// post请求的时候，设置数据格式
Vue.http.options.emulateJSON = true;
// 引入mui样式
import '../static/css/mui.css'
import '../static/css/icons-extra.css'

Vue.config.productionTip = false

import moment from 'moment';
// 定义过滤器
Vue.filter('dateFormat', function (dateStr, pattern = "YYYY-MM-DD HH:mm:ss") {
  return moment(dateStr).format(pattern);
});

// 导入需要的mint-ui组件
// import { Button,Lazyload } from 'mint-ui';
// Vue.component(Button.name, Button);
// Vue.use(Lazyload);
import MintUI from 'mint-ui'
Vue.use(MintUI)
import 'mint-ui/lib/style.css'


// 导入缩略图插件
// import VuePreview from 'vue-preview'
// Vue.use(VuePreview)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
